import axios from "./config"

// 登入接口
export const loginApi= (username,password) => axios.post("/users/login",{
    username,
    password
})

// 获取验证码
export const getCaptchaApi = () => axios.get("/users/getCaptcha")

// 校验验证码
export const verifyCaptchaApi = (captcha="") => axios.get("/users/verifyCaptcha",{
    params:{
        captcha
    }
})

// 获取登入日志
export const getLoginApi = (page=1,count=10) => axios.get("	/getloginlog",{
    params:{
        page,
        count
    }
})

// 获取二维码地址
export const getQrcodeApi = (sid)=> axios.get("/users/getQrcode",{
    params:{
        sid
    }
})

// 微信登入
export const getWechatApi = (wechatCode) => axios.get("/users/wechatLogin",{
    params:{
        wechatCode
    }
})

// 获取权限菜单
export const getMenuListApi = () => axios.get("/permission/getMenuList")

// 获取学员信息
export const getStuListApi = (page=1,count=10,classes="") =>axios.get("	/students/getstulist",{
    params:{
        page,
        count,
        class:classes
    }
})

// 添加学员信息
export const addStuListApi = data => axios.post("/students/addstu",data)

// 修改学员信息
export const updateStuApi = data => axios.post("/students/updatestu",data)

// 删除学员信息
export const removeStuApi = (sId) => axios.get("/students/delstu",{
    params:{
        sId
    }
})